package com.example.education.Configuration;

import com.example.education.service.impl.CollegeInfoServiceImpl;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class SimpleSchedule {

    private Integer time = 0;

    private CollegeInfoServiceImpl collegeInfoService;

    @Scheduled(fixedDelay = 86400 * 1000)   //定时器定义，设置执行时间 1s
    private void process1() {
        collegeInfoService.selectTopTen();
    }
}

